﻿Create PROCEDURE [dbo].[proc_Finance_Profit_Regulate_Create]
	(
		@CompanyId int,
		@CompanyName varchar(200),
		@Amount decimal(18,2),
		@Summary varchar(500),
		@RegulateDate datetime,
		@FillOutUserId varchar(50),
		@FillOutUserName varchar(50),
		@FillOutDate datetime
	)
AS
	Insert Into Finance_Profit_Regulate
	(
		Mid,
		CompanyId,
		CompanyName,
		Amount,
		Summary,
		RegulateDate,
		FillOutUserId,
		FillOutUserName,
		FillOutDate
	)
	Values
	(
		(SELECT distinct [pid] FROM [Zzjg] where CompanyId=@CompanyId), 
		@CompanyId,
		@CompanyName,
		@Amount,
		@Summary,
		@RegulateDate,
		@FillOutUserId,
		@FillOutUserName,
		@FillOutDate
	)
	RETURN
